<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="css/baicai.css" />
</head>

<body>
    <!-- 头部 -->
    <div class="bc-header">
        <a href=""><img src="./images/leftzzz.png" alt="" class="left"></a>
        <div>白菜价-淘宝内部券</div>
        <a href=""><img src="./images/header_app.png" alt="" class="download"></a>
    </div>
    <!-- 分类导航 -->
    <div class="bc-main">
        <div class="bc-category">
            <ul class="clearfix">

            </ul>
        </div>
        <div class="bc-goods">
            <div class="goods clearfix">
                <div class="bc-pic">
                    <img src="./images/goods1.jpg" alt="">
                </div>
                <div class="bc-content">
                    <p class="bc-title">[包邮]双十一红包 今日开启</p>
                    <p class="price">￥<span>0.0</span> <del>￥0</del></p>
                    <div class="jindu clearfix">
                        <div>1%</div>
                        <div>已领取82张</div>
                    </div>
                    <div class="bc-link">
                        <a href="#">点此领取15元优惠券</a>
                        <a href="#">下单连接</a>
                    </div>
                </div>
            </div>
            <div class="goods clearfix">
                <div class="bc-pic">
                    <img src="./images/goods1.jpg" alt="">
                </div>
                <div class="bc-content">
                    <p class="bc-title">[包邮]双十一红包 今日开启</p>
                    <p class="price">￥<span>0.0</span> <del>￥0</del></p>
                    <div class="jindu clearfix">
                        <div>1%</div>
                        <div>已领取82张</div>
                    </div>
                    <div class="bc-link">
                        <a href="#">点此领取15元优惠券</a>
                        <a href="#">下单连接</a>
                    </div>
                </div>
            </div>
            <div class="goods clearfix">
                <div class="bc-pic">
                    <img src="./images/goods1.jpg" alt="">
                </div>
                <div class="bc-content">
                    <p class="bc-title">[包邮]双十一红包 今日开启</p>
                    <p class="price">￥<span>0.0</span> <del>￥0</del></p>
                    <div class="jindu clearfix">
                        <div>1%</div>
                        <div>已领取82张</div>
                    </div>
                    <div class="bc-link">
                        <a href="#">点此领取15元优惠券</a>
                        <a href="#">下单连接</a>
                    </div>
                </div>
            </div>
            <div class="goods clearfix">
                <div class="bc-pic">
                    <img src="./images/goods1.jpg" alt="">
                </div>
                <div class="bc-content">
                    <p class="bc-title">[包邮]双十一红包 今日开启</p>
                    <p class="price">￥<span>0.0</span> <del>￥0</del></p>
                    <div class="jindu clearfix">
                        <div>1%</div>
                        <div>已领取82张</div>
                    </div>
                    <div class="bc-link">
                        <a href="#">点此领取15元优惠券</a>
                        <a href="#">下单连接</a>
                    </div>
                </div>
            </div>
            <div class="goods clearfix">
                <div class="bc-pic">
                    <img src="./images/goods1.jpg" alt="">
                </div>
                <div class="bc-content">
                    <p class="bc-title">[包邮]双十一红包 今日开启</p>
                    <p class="price">￥<span>0.0</span> <del>￥0</del></p>
                    <div class="jindu clearfix">
                        <div>1%</div>
                        <div>已领取82张</div>
                    </div>
                    <div class="bc-link">
                        <a href="#">点此领取15元优惠券</a>
                        <a href="#">下单连接</a>
                    </div>
                </div>
            </div>
            <div class="goods clearfix">
                <div class="bc-pic">
                    <img src="./images/goods1.jpg" alt="">
                </div>
                <div class="bc-content">
                    <p class="bc-title">[包邮]双十一红包 今日开启</p>
                    <p class="price">￥<span>0.0</span> <del>￥0</del></p>
                    <div class="jindu clearfix">
                        <div>1%</div>
                        <div>已领取82张</div>
                    </div>
                    <div class="bc-link">
                        <a href="#">点此领取15元优惠券</a>
                        <a href="#">下单连接</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 脚部 -->
    <div class="footer">
        <ul class="clearfix">
            <li><a href="#">登录</a></li>
            <li><a href="#">注册</a></li>
            <li style="width: 40%"><a href="#" class="goTop"><img src="./images/top.jpg">返回顶部</a></li>
        </ul>
        <div class="footer-des">
            <span>手机APP下载</span>
            <span>慢慢买手机版 -- 掌上比价平台</span>
            <p>m.manmanbuy.com</p>
        </div>
        <div class="to-top"><a href="#"><img src="./images/up.png" alt=""></a></div>   
    </div>
</body>
</html>
<script src="./lib/jquery/jquery.js"></script>
<script src="./lib/artTemplate/template.js"></script>
<script type="text/template" id="titleTmp">
{{each result as val key }}
    <li>{{val.title}}</li>
{{/each}}
</script>
<script>
    $.ajax({
        type: 'get',
        url: 'http://193.112.55.79:9090/api/getbaicaijiatitle',
        success: function (res) {
            // console.log(typeof res);
            // console.log(res.result);
            var htmlStr = template('titleTmp', res);
            $('.bc-category ul').html(htmlStr);
        }
    })
</script>
<script>
    $(function () {
        var goTop = $('.goTop');
        var toTop = $('.to-top');
        toTop.hide();

        //返回顶部显示
        $(window).scroll(function () {
            $(window).scrollTop() > 200 ? toTop.show() : toTop.hide();
        });
        //回到顶部
        goTop.on('click', function () {
            $('html,body').animate({ scrollTop: 0 }, 500)
        });
        toTop.on('click', function () {
            $('html,body').animate({ scrollTop: 0 }, 0)
        });
    })
</script>